import request from '@/utils/request'
import { listVo } from '@/api/type'

const T = '/system'

export interface Request {
  /**
   * 计划指令
   */
  instructInfo: string
  /**
   * 备注
   */
  remark: string
  /**
   * 状态
   */
  status: string
  [property: string]: any
}

/**
 * 列表
 * @param {*} params
 * @returns
 */
export function GetListAPI(params: listVo) {
  return request({
    url: T + '/planningInstruction/list',
    method: 'GET',
    params,
  })
}

/**
 * 新增
 * @param {*} data
 * @returns
 */
export function AddDataAPI(data: Request) {
  return request({
    url: T + '/planningInstruction',
    method: 'POST',
    data,
  })
}

/**
 * 修改
 * @param {*} data
 * @returns
 */
export function EditDataAPI(data: Request) {
  return request({
    url: T + '/planningInstruction',
    method: 'PUT',
    data,
  })
}

/**
 * 删除
 * @param id
 * @returns
 */
export function DelDataAPI(id: string) {
  return request({
    url: T + '/planningInstruction/remove/' + id,
    method: 'DELETE',
  })
}

/**
 * 详情
 * @param id
 * @returns
 */
export function GetDetailsAPI(id: string) {
  return request({
    url: T + '/planningInstruction/view/' + id,
    method: 'GET',
  })
}

/**
 * 计划指令下拉
 * @param
 * @returns
 */
export function GetPlanningInstructionSelectAPI() {
  return request({
    url: T + '/planningInstruction/getDelList',
    method: 'GET',
  })
}
